﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Celestial Home - Extracting every detail of your dream</title>
    <link rel="Stylesheet" type="text/css" href="css/master.css" />
    <link rel="Stylesheet" type="text/css" href="css/message.css" />
    
    <script type="text/javascript" src="javascripts/helpers.js"></script>
    <script type="text/javascript" src="javascripts/login.js"></script>
    <script type="text/javascript">
        window.onload = function() {

            //checkLogin(); // *requires fixing...

            /* display message for activation */
            var strFirstName = getCookie("FirstName");
            var strEmail = getCookie("Email");

            if (strFirstName == "" || strEmail == "") {

                /* Check for errors */
                var strError = getCookie("Error");
                document.cookie = "Error=" + strError + "; expires=Thu, 01-Jan-1970 00:00:01 GMT";

                var divMain = document.getElementById("divMain");

                if (strError == "115")  // email already activated  
                    divMain.innerHTML = "<em>" + strEmail + "</em> is already activated. Please proceed to login <a href='login.html' >here</a>.";

                else if (strError == "113") // email not registered
                    divMain.innerHTML = "<em>" + strEmail + "</em> has not been registered. Please proceed to register <a href='register.html' >here</a>.";

                else return;
            }
            else {
                /* removes the cookie */
                document.cookie = "FirstName=" + strFirstName + "; expires=Thu, 01-Jan-1970 00:00:01 GMT";
                document.cookie = "Email=" + strEmail + "; expires=Thu, 01-Jan-1970 00:00:01 GMT";

                var strMessage = "<img src='images/activated.png' alt='activated' style='float:right; margin:1em;'/>" + " Welcome back! <em>" + strFirstName +
                             "</em>. Your account <em>" + strEmail + "</em> has been activated. You may now login to Celestial Home. Click <a href='login.html'>here</a> to login."

                var divMain = document.getElementById("divMain");
                divMain.innerHTML = strMessage;
            }
        }
    </script>
</head>
<body>

<div id="divTitle">
    <div id="divCustMenu">
        <img src="images/user.png" alt="user" /><a id="aLogin" href="login.html">Login</a> |
        <img src="images/profile.png" alt="profile" /><a id="aProfile" href="particulars.html">My Profile</a> |
        <img src="images/cart.png" alt="cart" /><a href="construct.html">My Cart</a> | 
        <img src="images/checkout.png" alt="checkout" /><a href="construct.html">Checkout</a>
    </div><!--ends divCustmenu-->
    <div id="divWelcome"></div>
</div><!--ends divTitle-->

<!-- Navigation Bar - common for all pages -->
<div id="divNavBar">
    <ul id="ulNavBar">
        <li><img src="images/home.png" alt="home"/><a href="index.html"> Home</a></li>
        <li><img src="images/briefcase.png" alt="home"/><a href="construct.html"> About Us</a></li>
        <li><img src="images/chair.png" alt="home"/><a href="construct.html"> Products</a>
            <ul>
                <li><a href="construct.html">Bed Room</a>
                    <ul>
                        <li><a href="construct.html">Beds</a></li>
                        <li><a href="construct.html">Wardrobes</a></li>
                    </ul>
                </li>
                <li><a href="construct.html">Dining Room</a>
                    <ul>
                        <li><a href="construct.html">Chairs</a></li>
                        <li><a href="construct.html">Tables</a></li>
                        <li><a href="construct.html">Dining Sets</a></li>
                    </ul>
                </li>
                <li><a href="construct.html">Living Room</a>
                    <ul>
                        <li><a href="construct.html">Coffee Tables</a></li>
                        <li><a href="construct.html">Sofa</a></li>
                        <li><a href="construct.html">Sofa Sets</a></li>
                        <li><a href="construct.html">Entertainment</a></li>
                    </ul>
                </li>
                <li><a href="construct.html">Study Room</a>
                    <ul>
                        <li><a href="construct.html">Desks</a></li>
                        <li><a href="construct.html">Book Shelves</a></li>
                    </ul>
                </li>
            </ul>
        </li> <!--ends Products menu-->
        <li><img src="images/design.png" alt="home"/><a href="construct.html"> Design</a>
            <ul>
                <li><a href="construct.html">Wardrobe</a></li>
                <li><a href="construct.html">Home Theatre</a></li>
            </ul>
        </li> <!--ends design menu-->
        <li><img src="images/earth.png" alt="home"/><a href="construct.html"> Support</a>
            <ul>
                <li ><a href="construct.html">Contact Us</a></li>
                <li><a href="construct.html">Track Order</a></li>
            </ul>
        </li> <!--ends support menu-->  
    </ul>  <!--ends navigation menu-->
</div> <!--ends navigation division--> 

<div id="divMain">
</div><!-- ends div main -->
 
<div id="divFooter">
    <div id="divFooterLeft">&#169 Copyright 2010 Celestial Home</div>
    <div id="divFooterRight"> Site Design by <a href="#" id="aDreamArchitect"><img src="images/dream.png" alt="Dream Architect"/></a></div>
    <div id="divFooterCenter"><img src="images/visa.gif" alt=""/><img src="images/paypal.png" alt="" /></div>
</div><!--ends divFooter-->

</body>
</html>
